package org.phona.object;

import android.util.Log;

public class Contact {

	String name;
	String phoneNumber="";
	String defaultPhoneNumber="";
	
	public Contact(String name) {
		this.name=name;
	}

	public void add(String phoneNumber) {
		Log.i("CONTACT","adding "+phoneNumber);
		if(
				phoneNumber.startsWith("06")
				||phoneNumber.startsWith("07")
				||phoneNumber.startsWith("+336")
				||phoneNumber.startsWith("+337")
				){	
			defaultPhoneNumber=phoneNumber;
		}
		this.phoneNumber+=(this.phoneNumber.equals("")?"":",")+phoneNumber;
	}
	
	public String getPhoneNumbers(){
		return phoneNumber;
	}

	public String getName() {
		return name;
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return name+" "+phoneNumber;
	}

	public String getDefaultPhoneNumber() {		
		return defaultPhoneNumber;
	}

}
